package org.ii.dataprovider.dapper;

public class Exceptions {
	
	/**
	 * An exception thrown when a network error occurs (timeout, server down, etc.)
	 */
	public static class NetworkErrorException extends Exception {
		private static final long serialVersionUID = -8760974200019687905L;

		public NetworkErrorException() {
			super();
		}

		public NetworkErrorException(String arg0, Throwable arg1) {
			super(arg0, arg1);
		}

		public NetworkErrorException(String arg0) {
			super(arg0);
		}

		public NetworkErrorException(Throwable arg0) {
			super(arg0);
		}
		
	}
	
	/**
	 * An exception thrown when the output of a Dapp is not valid XML.
	 *
	 * Some times Dapper does not return valid XML.  This typically occurs when a 
	 * serious error has been encountered.
	 */
	public static class InvalidDappOutputException extends Exception {
		private static final long serialVersionUID = -7791309441008931362L;

		public InvalidDappOutputException() {
			super();
		}

		public InvalidDappOutputException(String arg0, Throwable arg1) {
			super(arg0, arg1);
		}

		public InvalidDappOutputException(String arg0) {
			super(arg0);
		}

		public InvalidDappOutputException(Throwable arg0) {
			super(arg0);
		}
		
		
	}
	
	/**
	 * An exception thrown when the an attempt is made to use a non-existant Dapp
	 */
	public static class DappNotFoundException extends Exception {
		private static final long serialVersionUID = -6814221500714674962L;

		public DappNotFoundException() {
			super();
		}

		public DappNotFoundException(String arg0, Throwable arg1) {
			super(arg0, arg1);
		}

		public DappNotFoundException(String arg0) {
			super(arg0);
		}

		public DappNotFoundException(Throwable arg0) {
			super(arg0);
		}
		
		
	}
	
	/**
	 * An exception thrown when the variable arguments to a Dapp do not match the
	 * variable arguments expected
	 */
	public static class InvalidVariableArgumentsException  extends Exception {
		private static final long serialVersionUID = -8227427418747772700L;

		public InvalidVariableArgumentsException() {
			super();
		}

		public InvalidVariableArgumentsException(String arg0, Throwable arg1) {
			super(arg0, arg1);
		}

		public InvalidVariableArgumentsException(String arg0) {
			super(arg0);
		}

		public InvalidVariableArgumentsException(Throwable arg0) {
			super(arg0);
		}
		
		
	}	

  /**
   * An exception thrown when Dapper encountered an error running the Dapp
   */
  public static class DappExecutionErrorException extends Exception {
    private static final long serialVersionUID = 7168160330571335531L;

    public DappExecutionErrorException() {
      super();
    }

    public DappExecutionErrorException(String arg0, Throwable arg1) {
      super(arg0, arg1);
    }

    public DappExecutionErrorException(String arg0) {
      super(arg0);
    }

    public DappExecutionErrorException(Throwable arg0) {
      super(arg0);
    }
    
    
  }
}
